<template>
    <div>
      <table>
        <tr>
          <td>图片</td>
          <td>用户名</td>
          <td>评论次数</td>
          <td>价格</td>
        </tr>
        <tr v-for="i in goods">
          <td><img :src="'http://127.0.0.1:8000'+i.img" width="50" height="50" alt=""></td>
          <td>{{i.name}}</td>
          <td>{{i.count}}</td>
          <td>{{i.price}}</td>
        </tr>
      </table>
    </div>
</template>

<script>
    import axios from 'axios'

    export default {
        name: "show_goods",
      data(){
          return{
            goods:""
          }
      },
      mounted() {
          axios({
            url:'http://127.0.0.1:8000/show_goods/',
            method:'get',
            // data:goods
          }).then(res=>{
            this.goods=res.data.goods
          })
      }
    }
</script>

<style scoped>

</style>
